       <link href="css/bootstrap.min.css" rel="stylesheet">
       <link href="css/style.css" rel="stylesheet">
        <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" type="text/css" rel="stylesheet">
        <!--[if lt IE 9]>
          <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <link rel="shortcut icon" href="/bootstrap/img/favicon.ico">
        <link rel="apple-touch-icon" href="/bootstrap/img/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="/bootstrap/img/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="/bootstrap/img/apple-touch-icon-114x114.png">
        



<style type="text/css">
body {
	background::#F00;
	}
.tabla th {
padding: 5px;
font-size: 16px;
background-color: #83aec0;
background-image: url(img/azul.jpg);
background-repeat: repeat-x;
color: #FFFFFF;
border-right-width: 1px;
border-bottom-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-right-color: #558FA6;
border-bottom-color: #558FA6;
font-family: “Trebuchet MS”, Arial;
text-transform: uppercase;
}
.titulo {
	background-color: #FFF;
	background-image: url(img/azul.jpg);
	background-repeat: repeat-x;
	float: none;
	height: auto;
	width: 120px;
	clear: both;
}
.contenido {
	float: none;
	height: auto;
	width: 140px;
}
.link {
	width: 64px;
	float: none;
	clear: right;
	height: auto;
}
.perfil {
	clear:none;
	float: left;
	width: 1000 px;
	height: auto;
	color:#000;
	

}
.perfil a{
	color:#000;
	font-size:16px;
}
.perfil .tit2 {
	font-size: 24px;
	color: #000;
}
</style>
<script type="text/javascript">
function activartodo() {
	document.formulario.apellido.disabled=false;
	document.formulario.nombre.disabled=false;
	document.formulario.mail.disabled=false;

}


</script>

<?php 
$username = $this->session->userdata['username'];
			$nombre = $this->session->userdata['nombre'];
			$apellido = $this->session->userdata['apellido'];
			$mail = $this->session->userdata['email'];
			$pass = $this->session->userdata['password'];
			$activo = $this->session->userdata['sede'];
			$id = $this->session->userdata['idu'];
			$sede = $this->session->userdata['sede'];
			$nombre_tipo = $this->session->userdata['nombre_tipo'];
			$nombresede = $this->session->userdata['nombresede'];
			$privilegio = $this->session->userdata['privilegio'];

?>
<center>
<div class="perfil"><span class="perfil"></span>
<h2><?php echo $nombre?>&nbsp;<?php echo $apellido?></h2>
<p>&nbsp;</p>
<p><img src="img/defaul_user.jpg" width="160" height="160"></p>
<!---->

<script>
function cambiarpass() {

}

	 
</script>

<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<script type="text/javascript">
var ok1 = false;
var ok2 = false;

$(document).ready(function(){
    $("input[name=passactual]").change(function(){
		var er = document.getElementById("error1");
		var bn = document.getElementById("bien1");
       	 $( er ).empty();
		 $( bn ).empty();
		 	if(document.formulario2.passactual.value==<?php echo $pass; ?>)	
	{
  
		   //$( er ).empty();
		document.formulario2.passactual.style.backgroundColor='#64FE2E';
		var iconob = document.createElement("i");
		iconob.className="icon-checkmark2";
		iconob.style.color='green';
		ok1 = "true";
		var texto = document.createTextNode("ok");
		bn.appendChild(iconob);
		bn.appendChild(texto);

		}
	else {
		 //$( bn ).empty();
		//alert(document.formulario2.passactual.value);
		document.formulario2.passactual.style.backgroundColor='#f00';
		var iconoe = document.createElement("i");
		iconoe.className="icon-cancel-circle";
		iconoe.style.color='#f00';
		var texto = document.createTextNode("la contraseña no coincide");
		er.appendChild(iconoe);
		er.appendChild(texto);
		ok1 = "false";
		}
		
		//
    });
    $("input[name=passn2").change(function(){
       //
	   var er = document.getElementById("error2");
		var bn = document.getElementById("bien2");
       	 $( er ).empty();
		 $( bn ).empty();
		 	if(document.formulario2.passn.value==formulario2.passn2.value)	
	{
  
		   //$( er ).empty();
		document.formulario2.passn.style.backgroundColor='#64FE2E';
		document.formulario2.passn2.style.backgroundColor='#64FE2E';
		var iconob = document.createElement("i");
		iconob.className="icon-checkmark2";
		iconob.style.color='green';

		var texto = document.createTextNode("ok");
		bn.appendChild(iconob);
		bn.appendChild(texto);
		ok2 = "true";

		}
	else {
		 //$( bn ).empty();
		//alert(document.formulario2.passactual.value);
		document.formulario2.passn.style.backgroundColor='#f00';
		document.formulario2.passn2.style.backgroundColor='#f00';
		var iconoe = document.createElement("i");
		iconoe.className="icon-cancel-circle";
		iconoe.style.color='#f00';
		var texto = document.createTextNode("las contraseñas no coinciden");
		er.appendChild(iconoe);
		er.appendChild(texto);
		ok2 = "false";
		}
	   
	   //
    });
 
});

function cambiarpass() {
	var boton = document.getElementById("eviarpass");
	alert(ok1+" "+ok2);
	if(ok1&&ok2) {
		
		 $(boton ).empty();
		var texto = document.createTextNode("Confirmar");
		boton.appendChild(texto);
		boton.href= 'onclick="javascript:document.formulario.submit()"'
		
	}else {
		boton.href="#"
	}
	
}
</script>
<!---->
<p>&nbsp;</p>
<p class="tit2"><a href="javascript:activartodo()"><span class="icon-pencil">Editar Todo</span></a></p>
<form name="formulario" action="/trabajoFinal/administracionUsuario/modificar_usuario_perfil" method="post">
<input type="hidden" name="idusuario" value="<?php echo $id?>" />
<div class="datagrid">
<table width="200" border="0" class="darkheader-nospace-borders-side" style="color:#000">
  <tr>
    <th scope="row">nombre</th>
    <td>
      <input required  type="text" name="nombre" id="nombre" disabled width="140" value="<?php echo $nombre?>"></td>
    <td><a href="#" onClick="document.formulario.nombre.disabled=!document.formulario.nombre.disabled"><i class="icon-pencil"></span>editar</a></td>
    <td><?php echo form_error('nombre');?></td>
  </tr>
  <tr>
    <th scope="row">apellido</th>
    <td><input type="text" required name="apellido" id="apellido" disabled width="140" value="<?php echo $apellido?>"></td>
    <td><a href="#" onClick="document.formulario.apellido.disabled=!document.formulario.apellido.disabled"><i class="icon-pencil"></span>editar</a></td>
    <td><?php echo form_error('nombre');?></td>
  </tr>
  <tr>
    <th scope="row">E-mail</th>
    <td><input type="email" required name="email" id="mail" disabled width="140" value="<?php echo $mail?>"></td>
    <td><a href="#" onClick="document.formulario.mail.disabled=!document.formulario.mail.disabled"><i class="icon-pencil"></span>editar</a></td>
    <td> <?php echo form_error('email');?> </td>
    
  </tr>
  <tr>
    <th scope="row">Username</th>
    <td>
    <input type="text" name="username" id="username" disabled width="140" value="<?php echo $username?>"></td>
    <td></td>
    <td> </span></td
  ></tr>
  <tr>
    <th scope="row">Password</th>
    <td><input type="text" required name="password" id="pass" disabled width="140" value="<?php echo $pass?>"></td>
    <td><!--<a data-toggle="modal" href="#myModal" class="btn btn-primary">cambiar</a>--><a href="#" onClick="document.formulario.password.disabled=!document.formulario.password.disabled"><i class="icon-pencil"></span>editar</a></td>
    <td> <?php echo form_error('password');?></td
  ></tr>
  
   <tr>
    <th scope="row">Privilegio</th>
    <td><input type="text" name="nombrepri" id="pass" disabled width="140" value="<?php echo $nombre_tipo?>"></td>
    <td> </span></td>
    <td> </span></td
  ></tr>
  <?php if($privilegio>1) {
    echo '<th scope="row">Sede</th>';
    echo "<td><input type=\"text\" name=\"sede\" id=\"sede\" disabled width=\"140\" value=\"";
	echo $nombresede;
	echo"\"></td>";
    echo '<td>';
   echo '</td>';
  }
  ?>
  <tr>
    <th scope="row"><input type="submit" name="button" id="button" value="Enviar" class="btn btn-primary"></th>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
</div>
</center>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

  <p><!-- Password Reset Modal -->

<div class="modal" id="myModal">
	<div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h4 class="modal-title">Cambiar contraseña</h4>
        </div>
        <div class="modal-body">
          Complete el formulario para cambiar su contraseña<br>
          <form name="formulario2" action="administracionUsuario/modificar_usuario_perfil" method="post">
          <table width="500" border="0">
  <tr>
    <th scope="row">*contraseña actual:</th>
    <td style="width:330"><input name="passactual" type="password"> <span id="error1"></span><span id="bien1"></span></td>
  </tr>
  <tr>
    <th scope="row">*contraseña nueva:</th>
    <td><input name="passn" type="password"></td>
  </tr>
  <tr>
    <th scope="row">*repetir contraseña:</th>
    <td><input name="passn2" type="password"> <span id="error2"></span><span id="bien2"></td>
  </tr>
    <tr>
    <th scope="row"></th>
    <td></td>
  </tr>
</table>

        </div>
        <div class="modal-footer">
          <a href="#" data-dismiss="modal" class="btn">Cancelar</a>
          <a href="#" onClick="javascript:cambiarpass()"class="btn btn-primary" id="eviarpass">Guardar Cambios</a> <input value="Guardar Cambios"name="" type="submit" class="btn btn-primary" />
        </div>
      </div>
      </form>
    </div>
</div>
        
        <script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>


        <script type='text/javascript' src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>



        
        <!-- JavaScript jQuery code from Bootply.com editor -->
        
        <script type='text/javascript'>
        
        $(document).ready(function() {
        
            $('#openBtn').click(function(){
	$('#myModal').modal({show:true})
});
        
        });
        
        </script>
  <!-- end of Password Reset Modal -->
  </p>






